Repository navigation
Split RunCommandTests by area so the test project builds again [patch] - #154
Open
matt-edmondson wants to merge 1 commit into
Open
matt-edmondson wants to merge 1 commit into
matt-edmondson wants to merge 1 commit into
Conversation
RunCommandTests had grown to 98 coupled types, over CA1506's limit of 96, so RunCommand.Test failed to build on main and CI was red. Move the overlay PATH, output decoding, and LineOutputHandler run tests into their own classes. No test changes behaviour. Fixes #152 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017vfJW5GEJNk1TZFgDdUPFX
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.



Fixes #152
What
RunCommandTestswas coupled with 98 types, over CA1506's limit of 96. Because of that,RunCommand.Testfailed to build onmainand every CI run was red. This PR moves three areas into classes of their own and changes no test bodies:OverlayPathTests: overlay PATH resolution,CanExecute,ResolveOnSearchPathOutputDecodingTests: byte order marks and strict decodingLineOutputHandlerRunTests:LineOutputHandlerreused across runsThree helpers are shared across classes and are now
internal(CreateDirectoryForTest,SkipOnWindows,GetEmitFileBytesCommand). Each field moved with the tests that use it. Nothing is suppressed.Verification (Linux, .NET 10.0.403)
dotnet build RunCommand.Testfails withCA1506: 'RunCommandTests' is coupled with '98' different typesdotnet buildsucceeds with analyzers on and 0 warningsktsu.RunCommand.Test: 111 total, 108 passed, 3 skipped, 0 failed. That is the same count the issue reported with analyzers off.After this merges, #150 and #151 should pass once they are rebased.
Generated by Claude Code